def get_chessboard_html():
  cols = "abcdefgh"

  # Build the chessboard HTML code
  result = '<table class="chessboard" cellspacing="0" cellpadding="0">'
  
  # For each row from 8 downto 1
  for row in range(8, 0, -1):
    # New row
    result += '<tr>'
    
    for i in range(8):
      # Normal square
      sclass = 'white' if (row + i) % 2 == 0 else 'black'
      result += '<td class="square %s" id="%s" />' % (sclass, cols[i] + row.__str__()) 
      
    # Row id in the last cell of the row
    result += '<td class="rowid">%s</td>' % row.__str__()
    result += '</tr>'
  
  # Add column ids to another row  
  result += '<tr>'
  
  for col in "abcdefgh":
    result += '<td class="colid">%s</td>' % col.__str__()
    
  result += '</tr>'
  result += "</table>"
  
  return result
